﻿@using Orchard.ContentManagement
@using Orchard.MediaLibrary.Fields
@using Orchard.Utility.Extensions;

@{
    var field = (MediaLibraryPickerField) Model.ContentField;
    string displayName = field.DisplayName;
    string name = field.Name;
    var contents = field.MediaParts;
}
<section class="media-library-picker-field media-library-picker-field-@name.HtmlClassify()">
    <h3>@displayName</h3>
    @foreach(var content in contents) {
    <div>
        @Display(BuildDisplay(content, "Summary"))
    </div>
    }
</section>